#include  <reg52.h>
void CSH_zd0(void);
#define Led_all P2
sbit Key1 = P3 ^ 3;



void Delay(unsigned char i)
{
	while (i--);
}

void CSH_zd0(void)
{
	IT1 = 1;
	EX1 = 1;
	EA = 1;
}


void LSD(void)
{
	unsigned int y;
	while (1)
	{
		for (y = 0; y <= 7; y++)
		{
			Led_all = ~(0x01 << y);
			Delay(10000);
		}
		for (y = 0; y <= 7; y++)
		{
			Led_all = ~(0x08 >> y);
			Delay(10000);
		}
	}

}

void CSH_zd1() interrupt 2
{
	Delay(4000);
	if (Key1 == 0)
	{
		LSD();
	}
}

void main()
{
	CSH_zd0();
	while (1);

}